#include "mainwindow.h"
RunLine ::RunLine( const QString str_, int speed, QWidget *p ) :
        QLabel( p ), position( 0 ), str( str_ ) {
    setText( str );
    timerID = startTimer( (int) ( 250 / speed ) );
}
RunLine ::~RunLine() {
    killTimer( timerID );
}
void RunLine ::timerEvent(QTimerEvent *p) {
    int length;
    length = str .length();

    if( ++position >= length )
        position = 0;

    setText( str.right( position ) + str.left( length - position ) );
}
